from rpc.pubsub_pb2 import mes2client, mes2server
from rpc.pubsub_pb2_grpc import pubsubStub
import grpc

def clientfunc():
    labels = set()
    while True:
        with grpc.insecure_channel('localhost:50000') as channel:

            stub = pubsubStub(channel)
            mes = stub.pubsubServer(mes2server(mes1='msg'), timeout = 50000)
            print(mes.mes2)
            #set.add(mes.mid)

if __name__ == '__main__':
    clientfunc()